<?php
require_once 'index1.php';
?>
<script src="/libs/jquery-1.9.1.js"></script>
<script>
    function createAdmin(){
      $.post("createAdminResponse.php", $("#createAdminForm").serialize(), function(data){$("#fb").html(data)});
      setTimeout(function(){
            if($("#fb").text()=="Create successful"){
                var data="";
                $("#fb").hide().html(data).fadeIn("slow");
                $("#createAdminForm")[0].reset();
            }
                
        },2000);
    };
</script>
<div id="createAdmin">
    <div id="fb"></div>
    <form id="createAdminForm" class="addAdmin">
        <div class ="addadmin1">GiveName:<input type="text" name="giveName"></div>
        <div class ="addadmin2">SurName:<input type="text" name="surname"></div>
        <div class ="addadmin3">Email:<input type="text" name="email"></div>
    </form>
    <button id="button1" onclick="createAdmin()">add</button>
</div>


<?php
require_once 'index2.php';
?>
